<?php
/**
 * @file
 * Returns the HTML for a single Drupal page.
 *
 * Complete documentation for this file is available online.
 * @see https://drupal.org/node/1728148
 */
?>

<div id="page">
    <?php print render($page['help']); ?>

	<header class="header" id="header" role="banner">
		<div class="wrapper">

			<?php if ($logo): ?>
            <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" class="header__logo" id="logo">
                <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" class="header__logo-image" />
			</a>
			<?php endif; ?>
			
			<?php print render($page['header']); ?>
			<?php print render($page['navigation']); ?>
			
		</div>
	</header>
    <?php print $messages; ?>

	<?php if ($title): ?>
	<h1 class="page__title title element-invisible" id="page-title"><?php print $title; ?></h1>
	<?php endif; ?>
		
    <?php print render($page['highlighted']); ?>
    
	<div id="main">

        <?php
            // Render the sidebars to see if there's anything in them.
            $sidebar_first  = render($page['sidebar_first']);
            $sidebar_second = render($page['sidebar_second']);
        ?>

        <?php if ($sidebar_first): ?>
            <?php print $sidebar_first; ?>
        <?php endif; ?>
		<?php if ($sidebar_second): ?>
			<?php print $sidebar_second; ?>
		<?php endif; ?>

		<div id="content" class="column region-content" role="main">
		<div class="wrapper">
            <?php print $breadcrumb; ?>
			<a id="main-content"></a>
			<?php print render($title_prefix); ?>
			<?php print render($title_suffix); ?>
			<?php print render($tabs); ?>
			<?php if ($action_links): ?>
			<ul class="action-links"><?php print render($action_links); ?></ul>
			<?php endif; ?>
			<?php print render($page['content']); ?>
			<?php //print $feed_icons; ?>
		</div>
		</div>
		<?php print render($page['below_content']); ?>
	</div>
    <?php print render($page['bottom']); ?>
	<?php print render($page['footer']); ?>

</div>

<?php print render($page['popup']); ?>
<?php print render($page['overlay']); ?>
<?php print render($page['hidden']); ?>